package br.com.fromtis.jsf.beans;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import lombok.Getter;
import lombok.Setter;


@Getter
@Setter
public abstract class BaseMb<E> implements IBaseMb<E>{
	
	public void addMessageProcessing( String clientId){
		FacesContext.getCurrentInstance().addMessage(clientId , new FacesMessage(FacesMessage.SEVERITY_INFO,"Alerta", "Processando Dados") );
	}
	
	public void addMessageError( String clientId ) {
		FacesContext.getCurrentInstance().addMessage(clientId , new FacesMessage(FacesMessage.SEVERITY_ERROR,"Alerta", "Erro") );
	}
	
	public abstract E getEntity();
	
	
	
}
